<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<title>贵美商城</title>
 <link rel="stylesheet"	type="text/css"	href="css/global.css"	/>
 <link rel="stylesheet"	type="text/css"	href="css/layout.css"	/>
 <style type="text/css">
 	.aa:hover{background:green;}
 </style>
 <script type="text/javascript" src="js/jquery.js"></script>
 	<script type="text/JavaScript">
	var strHome = 'http://www.gmgw.com';
	function addFav(){
		switch(getNav()){
			case 1:
			  window.external.addFavorite(strHome,'贵美商城');
			  break;
			case 2:
			  window.sidebar.addPanel('贵美商城',strHome,'');
			  break;
			case 0:
			  alert("加入收藏失败");
			  break;
		}		
		function getNav(){
			if(navigator.userAgent.indexOf("MSIE")!=-1)    return 1;
			if(navigator.userAgent.indexOf("Firefox")!=-1) return 2;
			return 0;
			}
	}
	function setHome(oThis){
		oThis.style.behavior='url(#default#homepage)';
		oThis.setHomePage(strHome);
		return false;
	} 	
	function showTime(){
		now=new Date;
		var time = now.getFullYear()+"年"+(now.getMonth()+1)+"月"+now.getDate()+"日"+now.getHours()+"点"+now.getMinutes()+"分"+now.getSeconds();	
		
	}
	window.setInterval(function() {
		var now = new Date();
		var currTime = now.getFullYear()+"年"+(now.getMonth()+1)
					+"月"+now.getDate()+"日"+now.getHours()+"点"+now.getMinutes()+"分"+now.getSeconds();
		document.getElementById("time").innerHTML = "你好，欢迎访问贵美商城！" + currTime;
	}, 1000)
	
	$(function(){
		$("#search").click(function(){
			var keyWords = $("#keyWords").val();
			
			var url = "findProductByProductNameAction?productName="+keyWords;
		
			$("#mySub").attr("href",url);
		});
	});
	 
	</script>
</head>
  
<body>
		<div id="header">
			<div id="logo"></div>
			<div class="menu">
				<ul>
					<li class="pic pic1"></li>
					<li class="txt"><a href="showItemList" target="_parent">购物车</a></li>
					<li class="pic pic2"></li>
					<li class="txt"><a href="help.jsp" target="_parent">帮助中心</a></li>
					<li class="pic pic3"></li>
					<li class="txt"><a href="JavaScript:void(0);" onclick="addFav();">加入收藏</a></li>		
					<li class="pic pic4"></li>
					<li class="txt"><a href="JavaScript:void(0);" onclick="setHome(this);">设为首页</a></li>			
					<li class="pic btn txt"><a href="login.jsp" target="_parent">登录</a></li>
					<li class="pic btn txt"><a href="register.jsp" target="_parent">注册</a></li>
				</ul>
			</div> <!--menu	end-->
			<div class="f_r w62p">
				<ul>
					<li class="txt hello" id="time"></li>
				</ul>
			</div> 
			
			     <div class="nav f_l w100p">
  			        <ul>
		  			  	<li><a href="showIndexList" target="_parent">&nbsp;首&nbsp;&nbsp;&nbsp;页&nbsp;</a></li>
		  				<li><a href="findRealProductByBigProperty?bigProperty=家用电器" target="_parent">家用电器</a></li>
		  				<li><a href="findRealProductByBigProperty?bigProperty=手机数码" target="_parent">手机数码</a></li>
		  				<li><a href="findRealProductByBigProperty?bigProperty=日用百货" target="_parent">日用百货</a></li>
		  				<li><a href="findRealProductByBigProperty?bigProperty=书籍" target="_parent">&nbsp;书&nbsp;&nbsp;&nbsp;籍&nbsp;</a></li>
		  				<li><a href="help.jsp" target="_parent">帮助中心</a></li>
		  				<li><a href="Http://www.taobao.com" target="_blank">免费开店</a></li>
		  				<li><a href="Http://www.baidu.com" target="_blank">全球咨询</a></li> 	
		  				<li style="width:0px"><input type="text" value="" id="keyWords" name="productName" style="height:22px; width:160px; margin-left:68px; margin-top:3px;"/></li> 	
		               
			                <a id="mySub" href="" style="display:block;width:0px; border: 0px" target="_parent">
			                	<input type="button" value="" id="search" style="width:64px;margin-left:906px; margin-top:-36px; height:23px; background-color:transparent " />
			                </a>
		               			
  			      </ul>
   		        </div>			
			
  		<div class="nav f_l w100p">
  			<ul>
  				<li><a href="showIndexList" target="_parent">&nbsp;首&nbsp;&nbsp;&nbsp;页&nbsp;</a></li>
  				<li><a href="findRealProductByBigProperty?bigProperty=家用电器" target="_parent">家用电器</a></li>
  				<li><a href="findRealProductByBigProperty?bigProperty=手机数码" target="_parent">手机数码</a></li>
  				<li><a href="findRealProductByBigProperty?bigProperty=日用百货" target="_parent">日用百货</a></li>
  				<li><a href="findRealProductByBigProperty?bigProperty=书籍" target="_parent">&nbsp;书&nbsp;&nbsp;&nbsp;籍&nbsp;</a></li>
  				<li><a href="help.jsp" target="_parent">帮助中心</a></li>
  				<li><a href="help.jsp" target="_parent">免费开店</a></li>
  				<li><a href="help.jsp" target="_parent">全球咨询</a></li> 	
  			</ul>
  			
   		</div>			
		</div>
 </body>
</html>
